of 0 using a one-group test.
Using Statistical Tests for Comparing Averages
Now that you have reviewed the different types of comparisons, you can continue to consider the basic
concepts behind them as you dig more deeply. In this section, we discuss executing these tests in
statistical software and interpreting the output. We do that with several tests, including Student t tests,
the ANOVA, and nonparametric tests.
We opted not to clutter this chapter with pages of mathematical formulas for the following tests
because based on our own experience, we believe you’ll probably never have to do one of these
tests by hand. If you really want to see the formulas, we recommend putting the name of the test in
quotes in a search engine and looking on the Internet.
Surveying Student t tests
In this section, we present the general approach to conducting a Student t test. We walk through the
computational steps common to the different kinds of t tests, including one-group, paired, and
independent. As we do that, we explain the computational differences between the different test types.
Finally, we demonstrate how to run the t tests using open source software R, and explain how to
interpret the output (see Chapter 4 for more information about getting started with R).
Understanding the general approach to a t test
As reviewed earlier, t tests are designed to compare two means only. If you measure the means
of two groups, you see that they almost always come out to be different numbers. The Student t
tests are intended to answer the question, Is the observed difference in means larger than what
you would expect from random fluctuations alone? The different t tests take the same general
approach to answer this question, using the following steps:
1. Calculate the difference (D) between the mean values you are comparing.
2. Calculate the precision of the difference, which is the magnitude of the random fluctuations
in that difference.
For the t test, calculate the standard error (SE) of that difference (see Chapter 10 for a refresher on
SE).
3. Calculate the test statistic, which in this case is t.
The test statistic expresses the size of the D relative to the size of its SE. That is:
.
4. Calculate the degrees of freedom (df) of the t statistic.
df is a tricky concept, but is easy to calculate. For t, the df is the total number of observations
minus the number of means you calculated from those observations.
5. Use the t and df to calculate the p value.